package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_juhe_region;

//DAO
public interface U_juhe_regionMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_JUHE_REGION  WHERE ID = #{id}")
	public ApiU_juhe_region findU_juhe_regionById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_juhe_region")
	public List<ApiU_juhe_region> findU_juhe_regions();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_juhe_regionsByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_JUHE_REGION (PROVINCE, CITY, AREA, AREAID, LON, LAT) VALUES (#{province}, #{city}, #{area}, #{areaid}, #{lon}, #{lat})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_juhe_region(ApiU_juhe_region u_juhe_region);

	// 修改
	@Update("UPDATE U_JUHE_REGION SET PROVINCE = #{province}, CITY = #{city}, AREA = #{area}, AREAID = #{areaid}, LON = #{lon}, LAT = #{lat} WHERE ID = #{id}")
	public int updateU_juhe_region(ApiU_juhe_region u_juhe_region);

	// 删除
	@Delete("DELETE FROM U_JUHE_REGION  WHERE ID = #{id}")
	public int deleteU_juhe_region(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
